package com.wzw.basics.feature.eight;

import java.util.Optional;

/**
 * 对空指针问题的加强 {@link java.util.Optional}
 *
 * @author Wangzhiwen
 */
public class OptionalApi {

    public static void main(String[] args) {
        Optional<Student> student = Optional.of(new Student());

    }

}

/**
 * 操作的对象
 */
class Student {

    private String name;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
